package com.practice.order.feign;

import com.practice.order.product.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "service-product",fallback = ProductFeignClientFallback.class)
public interface ProductFeignClient {

    //查询商品
    //mvc注解的两套使用逻辑
    //1.标注在Controller上，是接受这样的请求
    //2.标注在FeignClient上，是发送这样的请求
    @GetMapping("/api/product/product/{productId}")
    public Product getProduct(@PathVariable("productId") Long productId);


}
